import { FieldMetadataType, DateDisplayFormat } from 'twenty-shared/types';

import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';

import { getFlatFieldMetadataMock } from 'src/engine/metadata-modules/flat-field-metadata/__mocks__/get-flat-field-metadata.mock';
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';

export const FAVORITE_FOLDER_FLAT_FIELDS_MOCK = {
  position: getFlatFieldMetadataMock({
    id: '5894ab56-99b7-49e8-98be-dd6524250df5',
    standardId: '20202020-5278-4bde-8909-2cec74d43744',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.NUMBER,
    name: 'position',
    label: 'Position',
    defaultValue: 0,
    description: 'Favorite folder position',
    icon: 'IconList',
    standardOverrides: null,
    options: null,
    settings: null,
    isCustom: false,
    isActive: true,
    isSystem: true,
    isNullable: false,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: true,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-5278-4bde-8909-2cec74d43744',
  }),
  name: getFlatFieldMetadataMock({
    id: '1502abe0-b2f8-43a7-ae55-91c826b34ffe',
    standardId: '20202020-82a3-4537-8ff0-dbce7eec35d6',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.TEXT,
    name: 'name',
    label: 'Name',
    defaultValue: "''",
    description: 'Name of the favorite folder',
    icon: 'IconText',
    standardOverrides: null,
    options: null,
    settings: null,
    isCustom: false,
    isActive: true,
    isSystem: false,
    isNullable: false,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: true,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-82a3-4537-8ff0-dbce7eec35d6',
  }),
  id: getFlatFieldMetadataMock({
    id: '85ab1864-0a92-4682-8583-82e8b696410b',
    standardId: '20202020-eda0-4cee-9577-3eb357e3c22b',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.UUID,
    name: 'id',
    label: 'Id',
    defaultValue: 'uuid',
    description: 'Id',
    icon: 'Icon123',
    standardOverrides: null,
    options: null,
    settings: null,
    isCustom: false,
    isActive: true,
    isSystem: true,
    isNullable: false,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: true,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-eda0-4cee-9577-3eb357e3c22b',
  }),
  createdAt: getFlatFieldMetadataMock({
    id: 'a92b4b66-c2de-483e-8973-6f12bf36ac1a',
    standardId: '20202020-66ac-4502-9975-e4d959c50311',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.DATE_TIME,
    name: 'createdAt',
    label: 'Creation date',
    defaultValue: 'now',
    description: 'Creation date',
    icon: 'IconCalendar',
    standardOverrides: null,
    options: null,
    settings: { displayFormat: DateDisplayFormat.RELATIVE },
    isCustom: false,
    isActive: true,
    isSystem: false,
    isNullable: false,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: false,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-66ac-4502-9975-e4d959c50311',
  }),
  updatedAt: getFlatFieldMetadataMock({
    id: '3907fc24-3bf0-4f0b-88be-f9635e473145',
    standardId: '20202020-d767-4622-bdcf-d8a084834d86',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.DATE_TIME,
    name: 'updatedAt',
    label: 'Last update',
    defaultValue: 'now',
    description: 'Last time the record was changed',
    icon: 'IconCalendarClock',
    standardOverrides: null,
    options: null,
    settings: { displayFormat: DateDisplayFormat.RELATIVE },
    isCustom: false,
    isActive: true,
    isSystem: false,
    isNullable: false,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: false,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-d767-4622-bdcf-d8a084834d86',
  }),
  deletedAt: getFlatFieldMetadataMock({
    id: '52dcb335-5ce1-4165-a30b-4a61e84af21f',
    standardId: '20202020-b9a7-48d8-8387-b9a3090a50ec',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.DATE_TIME,
    name: 'deletedAt',
    label: 'Deleted at',
    defaultValue: null,
    description: 'Date when the record was deleted',
    icon: 'IconCalendarMinus',
    standardOverrides: null,
    options: null,
    settings: { displayFormat: DateDisplayFormat.RELATIVE },
    isCustom: false,
    isActive: true,
    isSystem: false,
    isNullable: true,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: true,
    relationTargetFieldMetadataId: null,
    relationTargetObjectMetadataId: null,
    universalIdentifier: '20202020-b9a7-48d8-8387-b9a3090a50ec',
  }),
  favorites: getFlatFieldMetadataMock({
    id: '71b95076-6b8d-45c9-9a7c-ab981b81bd1b',
    standardId: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
    objectMetadataId: '35763b74-1abe-4c4b-9eab-27693f0ee06d',
    type: FieldMetadataType.RELATION,
    name: 'favorites',
    label: 'Favorites',
    defaultValue: null,
    description: 'Favorites in this folder',
    icon: 'IconHeart',
    standardOverrides: null,
    options: null,
    settings: { relationType: RelationType.ONE_TO_MANY },
    isCustom: false,
    isActive: true,
    isSystem: true,
    isNullable: true,
    isUnique: false,
    workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
    isLabelSyncedWithName: true,
    relationTargetFieldMetadataId: 'fabbe669-b8fc-49fe-8010-f13d01eb61f1',
    relationTargetObjectMetadataId: 'f4749ffb-dde8-44ff-8b01-d3fc82df0ba2',
    universalIdentifier: '20202020-b5e3-4b42-8af2-03cd4fd2e4d2',
  }),
} as const satisfies Record<string, FlatFieldMetadata>;
